# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-deepdiff
pkgver=6.2.2
pkgrel=1
pkgdesc="Deep Difference and Search of any Python object/data."
url="https://github.com/seperman/deepdiff"
license=('MIT')
arch=('any')
depends=('python-ordered-set')
optdepends=('python-click: for cli'
            'python-yaml: for cli'
            'python-toml: for cli'
            'python-clevercsv: for cli')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-clevercsv' 'python-click' 'python-dateutil'
              'python-jsonpickle' 'python-numpy' 'python-toml' 'python-yaml')
source=("https://github.com/seperman/deepdiff/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('3a9d908e5cc64228da2be8d9960c55e8da084511ce97c006bbd0cfe80bf49548dc595317c598300d15b366d0609860e9c4082f8d8bc935eb27e6c8f466d88259')

build() {
  cd deepdiff-$pkgver
  python setup.py build
}

check() {
  cd deepdiff-$pkgver
  pytest tests
}

package() {
  cd deepdiff-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
